package com.example.roomtest

import android.app.Service
import android.content.Intent
import android.os.IBinder
import android.util.Log

/**
 *@author : Administrator
 *@descreption :
 */
class RemoteService : Service() {

    val math = Math()

    override fun onCreate() {
        super.onCreate()
        Log.d("TAG", "onCreate")
    }

    override fun onBind(intent: Intent): IBinder {
        return math
    }

    inner class Math : IMath.Stub() {

        override fun add(a: Int, b: Int): Int {
            return a + b
        }

    }
}